package alencar.app2.conversogeografico;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity implements OnClickListener{

	Button btnTransformar1, btnTransformar2;
	
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.atividade_principal);
        
        btnTransformar1 = (Button) findViewById(R.id.btn_transformar1);
        btnTransformar1.setOnClickListener(MainActivity.this);
        
        btnTransformar2 = (Button) findViewById(R.id.btn_transformar2);
        btnTransformar2.setOnClickListener(MainActivity.this);
    }

    @Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
    	switch (v.getId()) {
    	case R.id.btn_transformar1:
    		Intent intent1 = new Intent(MainActivity.this, Transformar1.class);
    		startActivity(intent1);	
    	break;
    	
    	case R.id.btn_transformar2:
    		Intent intent2 = new Intent(MainActivity.this, Transformar2.class);
    		startActivity(intent2);
    	break;
    	
    	default:
    	break;
    	}
	}


	@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

}